<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" th:value="${mSaveNote.id}"  type="hidden">
							<div class="form-group">	
								<label class="col-sm-3 control-label">性别：</label>
								<div class="col-sm-8">
									<select id="sex" name="sex" class="form-control" disabled>
										<option value="0" th:selected="${mSaveNote.sex == '0'}">男</option>
										<option value="1" th:selected="${mSaveNote.sex == '1'}">女</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">年龄：</label>
								<div class="col-sm-8">
									<input id="age" name="age" th:value="${mSaveNote.age}" class="form-control" type="text" maxlength="3" readonly>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">微信号：</label>
								<div class="col-sm-8">
									<input id="wxaccount" name="wxaccount" th:value="${mSaveNote.wxaccount}" class="form-control" type="text" maxlength="50" readonly>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">兴趣：</label>
								<div class="col-sm-8">
									<input id="interest" name="interest" th:value="${mSaveNote.interest}" class="form-control" type="text" maxlength="200" readonly>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">城市：</label>
								<div class="col-sm-8">
									<input id="city" name="city" th:value="${mSaveNote.city}" class="form-control" type="text" maxlength="100" readonly>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">审核状态：</label>
								<div class="col-sm-8">
									<input th:if="${mSaveNote.status} == 1" value="待审核" class="form-control" type="text" maxlength="100" readonly>
									<input th:if="${mSaveNote.status} == 2" value="审核通过" class="form-control" type="text" maxlength="100" readonly>
									<input th:if="${mSaveNote.status} == 3" value="审核不通过" class="form-control" type="text" maxlength="100" readonly>
									<input type="hidden" name="status" id="status" class="form-control"  maxlength="100" readonly>

								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">星座：</label>
								<div class="col-sm-8">
									<select id="xingzuo" name="xingzuo" class="form-control" disabled>
										<option value="水瓶座" th:selected="${mSaveNote.xingzuo == '水瓶座'}">水瓶座</option>
										<option value="双鱼座" th:selected="${mSaveNote.xingzuo == '双鱼座'}">双鱼座</option>
										<option value="白羊座" th:selected="${mSaveNote.xingzuo == '白羊座'}">白羊座</option>
										<option value="金牛座" th:selected="${mSaveNote.xingzuo == '金牛座'}">金牛座</option>
										<option value="双子座" th:selected="${mSaveNote.xingzuo == '双子座'}">双子座</option>
										<option value="巨蟹座" th:selected="${mSaveNote.xingzuo == '巨蟹座'}">巨蟹座</option>
										<option value="狮子座" th:selected="${mSaveNote.xingzuo == '狮子座'}">狮子座</option>
										<option value="处女座" th:selected="${mSaveNote.xingzuo == '处女座'}">处女座</option>
										<option value="天秤座" th:selected="${mSaveNote.xingzuo == '天秤座'}">天秤座</option>
										<option value="天蝎座" th:selected="${mSaveNote.xingzuo == '天蝎座'}">天蝎座</option>
										<option value="射手座" th:selected="${mSaveNote.xingzuo == '射手座'}">射手座</option>
										<option value="摩羯座" th:selected="${mSaveNote.xingzuo == '摩羯座'}">摩羯座</option>
									</select>
								</div>
							</div>

							<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button class="btn btn-primary" onclick="update(2)">审核通过</button>
									<button class="btn btn-success" onclick="update(3)">不通过</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript">

		function update(type) {
			$("#status").val(type);
			$.ajax({
				cache : true,
				type : "POST",
				url : ctxPath +"/shejiao/mSaveNote/update",
				data : $('#signupForm').serialize(),// 你的formid
				async : false,
				error : function(request) {
					parent.layer.alert("Connection error");
				},
				success : function(data) {
					if (data.code == 0) {
						parent.layer.msg("操作成功");
						parent.reLoad();
						var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
						parent.layer.close(index);

					} else {
						parent.layer.alert(data.msg)
					}

				}
			});

		}
	</script>
</body>
</html>
